﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Model;
using DAL;
using BLL;
using System.IO;
public partial class Text : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
      
        


    }
    /// <summary>
    /// 加密
    /// </summary>
    public static string Encrypt(string strToEncrypt)
    {
        string result = string.Empty;

        for (int i = 0; i < strToEncrypt.Length; i++)
        {
            //char和int是可以显示转换的
            //字符串其实就是字符数组
            char newChar = (char)((int)strToEncrypt[i] + 25);
            result = result + newChar;
        }

        return result;
    }

    /// <summary>
    /// 解密
    /// </summary>
    public string Decrypt(string strToDecrypt)
    {
        string result = string.Empty;

        for (int i = 0; i < strToDecrypt.Length; i++)
        {
            char newChar = (char)((int)strToDecrypt[i] - 25);
            result = result + newChar;
        }

        return result;
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        bool b = new FileInfoManager().Updatebyid("aa", 5, "aTT");
        Response.Write(b);
    }
}
